﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.Migrations;
using _1._6._2015_Movie.Data.Model; // have to be added, VS can't find on its own

namespace _1._6._2015_Movie.Data
{
    public static class Seeder
    {
        public static void Seed(MovieTheaterDbContext db)
        {
            db.Movies.AddOrUpdate(m => new { m.Title, m.Description, m.Rating, m.PosterUrl},
                new Movie
                {
                     Title = "INTO THE WOODS",
                     Description = "That's what the neighborhood witch (Meryl Streep) demands of a childless baker (James Corden) and his wife (Emily Blunt) when they beg her to break the curse she put on their house years ago. They wish for a baby. The Witch wishes she could break the cruel spell put on her by her own mother.",
                     Rating = "PG",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44405/itwposter.jpg"
                },
                new Movie
                {
                     Title = "The Gambler",
                     Description = "Mark Wahlberg plays Jim Bennett,  an associate professor of literature who long ago lost interest in trying to explain the complexities of Camus to college students.",
                     Rating = "R",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44905/gamblerposter__medium.jpg"
                },
                new Movie
                {
                     Title = "THE HOBBIT: THE BATTLE OF THE FIVE ARMIES 2D",
                     Description = "Bilbo Baggins, Thorin Oakenshield, and his Company of Dwarves have unwittingly unleashed the deadly dragon Smaug.",
                     Rating = "PG-13",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44338/the-hobbit-web-poster__medium.jpg"
                },
                new Movie
                {
                     Title = "THE INTERVIEW",
                     Description = "The show has a lot of fans, but the most surprising one is North Korea's Kim Jung Un.",
                     Rating = "R",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44950/the-interview-web-poster__medium.jpg"
                },
                new Movie
                {
                     Title = "THE WOMAN IN BLACK 2: ANGEL OF DEATH",
                     Description = "When a group of orphaned children are forced to move from their home in London, caretakers Eve (Phoebe Fox) and Jean (Helen McCrory) bring everyone to the desolate and eerie British countryside.",
                     Rating = "PG-13",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/45306/the-woman-in-black-2-web-poster__medium.jpg"
                },
                new Movie
                {
                     Title = "TOP FIVE",
                     Description = "Chris Rocks directs and co-stars along a mighty line-up including Rosario Dawson, Gabrielle Union, Cedric The Entertainer.",
                     Rating = "R",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44878/top-five-movie-poster__medium.jpg"
                },
                new Movie
                {
                     Title = "UNBROKEN",
                     Description = "Wartime drama that follows the incredible life of Olympian and war hero Louis Zamperini.",
                     Rating = "PG-13",
                     PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/45070/unbroken2a__medium.jpg"
                },
                new Movie
                {
                    Title = "WILD",
                    Description = "After the death of her vivacious, seize-the-moment mother (Laura Dern), who always believed in her and tried to guide her,",
                    Rating = "R",
                    PosterUrl = "http://d12vb6dvkz909q.cloudfront.net/uploads/galleries/44621/wild_movie_poster-693x1024__medium.jpg"
                }
                );
            db.SaveChanges();
        }
    }
}
